package com.shensi.api.admin.client.station;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.station.dto.StationDeviceManageDto;
import com.shensi.api.admin.domian.station.dto.SyncUserDto;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.enums.BusinessType;
import com.shensi.common.core.page.TableDataInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface StationDeviceManageClient {


    /**
     * 查询油站设备管理列表
     */
    @GetMapping("/station/manage/list")
    public TableDataInfo list(StationDeviceManageDto stationDeviceManage);

    /**
     * 查询油站设备管理列表
     */
    @GetMapping("/station/manage/feieList")
    public TableDataInfo feieList(StationDeviceManageDto stationDeviceManage);

    /**
     * 导出油站设备管理列表
     */
    @GetMapping("/station/manage/export")
    public AjaxResult export(StationDeviceManageDto stationDeviceManage);

    /**
     * 获取油站设备管理详细信息
     */
    @GetMapping(value = "/station/manage/{deviceId}")
    public AjaxResult getInfo(@PathVariable("deviceId") Long deviceId);

    /**
     * 新增油站设备管理
     */
    @PostMapping("/station/manage")
    public AjaxResult add(@RequestBody StationDeviceManageDto stationDeviceManage) throws Exception;

    @GetMapping("/station/manage/setVoice")
    public void setVoice(@RequestBody StationDeviceManageDto stationDeviceManage) throws InterruptedException ;

    @GetMapping("/station/manage/getK4Status")
    public AjaxResult getK4Status(@RequestBody StationDeviceManageDto stationDeviceManage);

    /**
     * 修改油站设备管理
     */
    @PutMapping("/station/manage")
    public AjaxResult edit(@RequestBody StationDeviceManageDto stationDeviceManage);

    /**
     * 删除油站设备管理
     */
    @PostMapping("/station/manage/delete")
    public AjaxResult remove(@RequestBody List<Long> deviceIds);

    /**
     * 状态修改
     */
    @PutMapping("/station/manage/changeManageStatus")
    public AjaxResult changeManageStatus(@RequestBody StationDeviceManageDto stationDeviceManage) ;
}
